<?php if (!empty($message)): ?>
    <script type="text/javascript" language="javascript">
        alert('<?php echo $message ?>');
    </script>
<?php endif; ?>
<?php if ($result) { ?>
    <script type="text/javascript" language="javascript">
        $(document).ready(function(){
            jQuery.prompt.close();
            $.prompt('Cảm ơn bạn đã liên hệ với chúng tôi.',{
                submit:function(v,m){
                    if(v == true){
                        location.href = "<?php echo base_url() ?>";
                    }
                    return true;
                },
                buttons: { Ok:true }
            });
        });
    </script>
<?php } ?>
<div class='block_content'>  
    <div class="block_style01">
        <h1>Liên Hệ</h1>
        <br/>
        <div class="contact-column">            
            <?php echo front_element('richtext', 'diachilienhe', $elements); ?>
        </div>

        <div class="spacer"></div>
        <br/>
        <form id="form1" method="post" action="" >
            <div class="forms">
                <table width="96%" cellpadding="5" cellspacing="2">
                    <tbody>     
                        <tr>
                            <td width='200px'> Tên<span class="require"> * </span>:</td>
                            <td>
                                <input name="name" class="textbox" type="text" data-bvalidator="required"  /></td>
                        </tr>
                       
                        <tr>
                            <td> Địa chỉ :</td>
                            <td><input name="address" class="textbox" type="text"  /></td>
                        </tr>

                        <tr>
                            <td>Email<span class="require"> *</span> :</td>
                            <td><input name="email" class="textbox" type="text" data-bvalidator="email,required"  /></td>
                        </tr>
                        <tr>
                            <td>Điện thoại <span class="require"> * </span>:</td>
                            <td><input name="phone" class="textbox" type="text" data-bvalidator="required" /></td>
                        </tr>
                        <tr>
                            <td>Fax :</td>
                            <td><input name="fax" class="textbox" type="text"  /></td>
                        </tr>


                        <tr>
                            <td valign="top">Nội dung<span class="require"> *</span> :</td>
                            <td><textarea name="comment" cols="85" rows="10" class="textarea" data-bvalidator="required" id="textarea"  ></textarea></td>
                        </tr>

                        <tr>
                            <td valign="top">Xác nhận <span class="require"> *</span> :</td>
                            <td valign="top"><input style="display: inline;float: left;margin-right: 5px;" name="captcha_input" class="textbox chan_capcha" data-bvalidator="required" type="text"  />
                                <div style="display: inline;float: left"><?php echo $captcha['image']; ?></div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div class="dev_bottom_box"><p><span class="require">*</span> Thông tin bắt buộc</p>                
                                    <input type="submit"  value="Gửi thông tin" class="submit" />
                                </div>
                            </td>
                        </tr>

                    </tbody>
                </table>
            </div>
        </form>

    </div>
</div>
    <script>
    $(document).ready(function () {
		$('#form1').bValidator();
	});</script>